////////////////////////////////////////////////////////////////////////////////
// Filename: modelclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _MODELCLASS_H_
#define _MODELCLASS_H_


//////////////
// INCLUDES //
//////////////
#include <vector>

////////////////
//OWN INCLUDES//
////////////////
#include "graphicsmodel.h"

/////////
//using//
/////////
using std::vector;

////////////////////////////////////////////////////////////////////////////////
// Class name: ModelClass
////////////////////////////////////////////////////////////////////////////////
class ModelClass
{
private:
	vector<GraphicsModel*> ModelList;
	vector<GraphicsModel*>::iterator iter;

public:
	ModelClass();
	ModelClass(const ModelClass&);
	~ModelClass();

	bool LoadData();
	bool Initialize(ID3D11Device*);
	void Shutdown();
	void Frame(unsigned long runtime);
	void Render(ID3D11DeviceContext*, unsigned long);

	int GetIndexCount();

private:
	bool InitializeBuffers(ID3D11Device*);
	bool UpdateBuffers(ID3D11DeviceContext*);
	void ShutdownBuffers();
	void RenderBuffers(ID3D11DeviceContext*);

private:
	ID3D11Buffer *m_vertexBuffer, *m_indexBuffer;
	int m_vertexCount, m_indexCount, currentVertex, currentIndex;
	D3D11_BUFFER_DESC vertexBufferDesc;
	D3D11_SUBRESOURCE_DATA vertexData;
	
};

#endif